package co.yixiang.huiMin.service.impl;

import co.yixiang.huiMin.entity.UserApply;
import co.yixiang.huiMin.mapper.UserApplyMapper;
import co.yixiang.huiMin.service.UserApplyService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 机修学堂 服务实现类
 * </p>
 *
 * @author Author
 * @since 2020-07-01
 */
@Service
public class UserApplyServiceImpl extends ServiceImpl<UserApplyMapper, UserApply> implements UserApplyService {

    @Resource
    private UserApplyMapper userApplyMapper;

    @Override
    public List<UserApply> selectUserApplys() {
        QueryWrapper<UserApply> queryWrapper = new QueryWrapper<>();

        return userApplyMapper.selectList(queryWrapper);
    }

    @Override
    public int updateUserApplyS(UserApply userApply) {
        userApply.setApplyDispose(1);
        return userApplyMapper.updateById(userApply);
    }
}
